package com.yanqu.road.entity.wineshop;

import com.yanqu.road.entity.DataObject;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author ：zfr
 * @date ：2021/7/5 10:50
 */
public class UserWineShopData extends DataObject {
    private long userId;                                                        //玩家id
    private int wineShopLv;                                                     //酒肆等级
    private int unlockRegion;                                                   //区域解锁进度
    private int power;                                                          //体力
    private long lastRecoverPowerTime;                                          //上一次恢复体力时间
    private long waitGenerateCount;                                             //等待生成的美女数量
    private List<WineShopBeautyArray> waitWineShopBeautyArrays = new ArrayList<>();    //正在排队的美女队列列表
    private List<WineShopBeautyArray> runningBeautyArrays = new ArrayList<>();           //正在运行中的美女列表
    private long popularityValue;                                               //酒肆知名度
    private long maxArrayId;                                                    //队列最大id
    private long maxBeautyId;                                                   //美女最大id
    private long receptionBeautyCount;                                          //招待完成的美女数量
    private long lastReceptionBeautyTime;                                       //最后一次招待美女时间
    private String wineShopName = "";                                                //酒肆名字
    private WineShopReward yieldReward = new WineShopReward();                  //暂存收益
    private long getRewardTime;                                                 //领取收益时间
    private int changeNickNameTimes;                                            //改名次数
    private List<Integer> generatedBeautyList = new ArrayList<>();              //已生成过的美女列表
    private List<Integer> generatedPatronsList = new ArrayList<>();             //已生成过的门客列表
    private Map<Integer, WineShopRankActivityData> wineShopRankActivityDataMap = new ConcurrentHashMap<>(); //冲榜活动数据


    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public int getWineShopLv() {
        return wineShopLv;
    }

    public void setWineShopLv(int wineShopLv) {
        if (this.wineShopLv != wineShopLv) {
            this.wineShopLv = wineShopLv;
            setUpdateOption();
        }
    }

    public int getUnlockRegion() {
        return unlockRegion;
    }

    public void setUnlockRegion(int unlockRegion) {
        if (this.unlockRegion != unlockRegion) {
            this.unlockRegion = unlockRegion;
            setUpdateOption();
        }
    }

    public int getPower() {
        return power;
    }

    public void setPower(int power) {
        if (this.power != power) {
            this.power = power;
            setUpdateOption();
        }
    }

    public long getLastRecoverPowerTime() {
        return lastRecoverPowerTime;
    }

    public void setLastRecoverPowerTime(long lastRecoverPowerTime) {
        if (this.lastRecoverPowerTime != lastRecoverPowerTime) {
            this.lastRecoverPowerTime = lastRecoverPowerTime;
            setUpdateOption();
        }
    }

    public long getWaitGenerateCount() {
        return waitGenerateCount;
    }

    public void setWaitGenerateCount(long waitGenerateCount) {
        if (this.waitGenerateCount != waitGenerateCount) {
            this.waitGenerateCount = waitGenerateCount;
            setUpdateOption();
        }
    }

    public List<WineShopBeautyArray> getWaitWineShopBeautyArrays() {
        return waitWineShopBeautyArrays;
    }

    public void setWaitWineShopBeautyArrays(List<WineShopBeautyArray> waitWineShopBeautyArrays) {
        this.waitWineShopBeautyArrays = waitWineShopBeautyArrays;
        setUpdateOption();
    }

    public List<WineShopBeautyArray> getRunningBeautyArrays() {
        return runningBeautyArrays;
    }

    public void setRunningBeautyArrays(List<WineShopBeautyArray> runningBeautyArrays) {
        this.runningBeautyArrays = runningBeautyArrays;
    }

    public long getPopularityValue() {
        return popularityValue;
    }

    public void setPopularityValue(long popularityValue) {
        if (this.popularityValue != popularityValue) {
            this.popularityValue = popularityValue;
            setUpdateOption();
        }
    }

    public long getMaxArrayId() {
        return maxArrayId;
    }

    public void setMaxArrayId(long maxArrayId) {
        if (this.maxArrayId != maxArrayId) {
            this.maxArrayId = maxArrayId;
            setUpdateOption();
        }
    }

    public long getMaxBeautyId() {
        return maxBeautyId;
    }

    public void setMaxBeautyId(long maxBeautyId) {
        if (this.maxBeautyId != maxBeautyId) {
            this.maxBeautyId = maxBeautyId;
        }
    }

    public long getReceptionBeautyCount() {
        return receptionBeautyCount;
    }

    public void setReceptionBeautyCount(long receptionBeautyCount) {
        if (this.receptionBeautyCount != receptionBeautyCount) {
            this.receptionBeautyCount = receptionBeautyCount;
            setUpdateOption();
        }
    }

    public long getLastReceptionBeautyTime() {
        return lastReceptionBeautyTime;
    }

    public void setLastReceptionBeautyTime(long lastReceptionBeautyTime) {
        if (this.lastReceptionBeautyTime != lastReceptionBeautyTime) {
            this.lastReceptionBeautyTime = lastReceptionBeautyTime;
            setUpdateOption();
        }
    }

    public String getWineShopName() {
        return wineShopName;
    }

    public void setWineShopName(String wineShopName) {
        if (!Objects.equals(this.wineShopName, wineShopName)) {
            this.wineShopName = wineShopName;
            setUpdateOption();
        }
    }

    public void addWaitWineShopBeautyArray(WineShopBeautyArray wineShopBeautyArray) {
        List<WineShopBeautyArray> tempList = new ArrayList<>(this.waitWineShopBeautyArrays);
        tempList.add(wineShopBeautyArray);
        this.waitWineShopBeautyArrays = tempList;
        setUpdateOption();
    }

    public void addRunningBeautyArray(WineShopBeautyArray wineShopBeautyArray) {
        List<WineShopBeautyArray> tempList = new ArrayList<>(this.runningBeautyArrays);
        tempList.add(wineShopBeautyArray);
        this.runningBeautyArrays = tempList;
        setUpdateOption();
    }

    public long getGetRewardTime() {
        return getRewardTime;
    }

    public void setGetRewardTime(long getRewardTime) {
        if (this.getRewardTime != getRewardTime) {
            this.getRewardTime = getRewardTime;
            setUpdateOption();
        }
    }

    public WineShopReward getYieldReward() {
        return yieldReward;
    }

    public void setYieldReward(WineShopReward yieldReward) {
        this.yieldReward = yieldReward;
        setUpdateOption();
    }

    public int getChangeNickNameTimes() {
        return changeNickNameTimes;
    }

    public void setChangeNickNameTimes(int changeNickNameTimes) {
        if (this.changeNickNameTimes != changeNickNameTimes) {
            this.changeNickNameTimes = changeNickNameTimes;
            setUpdateOption();
        }
    }

    public List<Integer> getGeneratedBeautyList() {
        return generatedBeautyList;
    }

    public void setGeneratedBeautyList(List<Integer> generatedBeautyList) {
        this.generatedBeautyList = generatedBeautyList;
        setUpdateOption();
    }

    public void addGenerateBeauty(int beautyId) {
        List<Integer> tempList = new ArrayList<>(this.generatedBeautyList);
        tempList.add(beautyId);
        this.generatedBeautyList = tempList;
        setUpdateOption();
    }

    public Map<Integer, WineShopRankActivityData> getWineShopRankActivityDataMap() {
        return wineShopRankActivityDataMap;
    }

    public void setWineShopRankActivityDataMap(Map<Integer, WineShopRankActivityData> wineShopRankActivityDataMap) {
        this.wineShopRankActivityDataMap = wineShopRankActivityDataMap;
        setUpdateOption();
    }

    public List<Integer> getGeneratedPatronsList() {
        return generatedPatronsList;
    }

    public void setGeneratedPatronsList(List<Integer> generatedPatronsList) {
        this.generatedPatronsList = generatedPatronsList;
    }

    public void addGeneratedPatronsList(int patronsId) {
        List<Integer> tempList = new ArrayList<>(this.generatedPatronsList);
        tempList.add(patronsId);
        this.generatedPatronsList = tempList;
        setUpdateOption();
    }
}
